#ifndef BASE_INCLUDE_FILE_UNITTEST_H
#define BASE_INCLUDE_FILE_UNITTEST_H

//---------------------------------------------------------
// Test framework
//---------------------------------------------------------
#include "tut/tut.hpp"
//---------------------------------------------------------
#define BASE_TESTSUITE_OBJECT(name)							\
		_private_testsuite_initializer_object_##name

#define BASE_TESTSUITE_BEGIN(name)														\
		struct _private_testsuite_initializer_##name;									\
		typedef tut::test_group<_private_testsuite_initializer_##name>::object name;	\
		tut::test_group<_private_testsuite_initializer_##name>							\
		BASE_TESTSUITE_OBJECT(name)(#name);												\
		struct _private_testsuite_initializer_##name {

#define BASE_TESTSUITE_END	};

#define BASE_TESTCASE(suitename, id)						\
	template<> template<> void suitename::test<id>()

#define BASE_TESTRUNNER(reporter)							\
		BASE_INITIALIZER_BEGIN								\
			reporter visitor;								\
			tut::runner.get().set_callback(&visitor);		\
			tut::runner.get().run_tests();					\
		BASE_INITIALIZER_END


#endif	//#ifndef BASE_INCLUDE_FILE_UNITTEST_H



